import http from './request.js'
// 获取省市区
function getArea(name) {
	return http({
		url: '/jeecg-boot/app/school/member/getProvinceCityArea?text=' + name,
		method: 'GET',
	})
}


// 获取学校列表
function schoolList(data) {
	return http({
		url: '/jeecg-boot/app/school/school/list',
		method: 'GET',
		data,
	})
}

//公众号授权登录
function memberLogin(data) {
	return http({
		url: '/jeecg-boot/app/school/member/WxMpLogin',
		method: 'Post',
		data,
	})
}

//获取用户信息
function getMemberInfo(data) {
	return http({
		url: '/jeecg-boot/app/school/member/info',
		method: 'Get',
		data,
	})
}


// 根据一级类目名称查询二级类目列表

function listByCategoryOneName(data) {
	return http({
		url: '/jeecg-boot/app/school/categoryTwo/listByCategoryOneName',
		method: 'Get',
		data,
	})
}

// 校源情报列表

function discussionList(data) {
	return http({
		url: '/jeecg-boot/app/school/discussion/list',
		method: 'Get',
		data,
	})
}


// 获取标签
function categoryTwoList(data) {
	return http({
		url: '/jeecg-boot/app/school/categoryTwo/list',
		method: 'Get',
		data,
	})
}

// 发布帖子

function discussionPublish(data) {
	return http({
		url: '/jeecg-boot/app/school/discussion/publish',
		method: 'Post',
		data,
	})
}

// 点赞取消点赞
function discussionLike(data) {
	return http({
		url: '/jeecg-boot/app/school/discussion/like',
		method: 'Post',
		data,
	})
}

//查询帖子详情
function discussionInfo(data) {
	return http({
		url: '/jeecg-boot/app/school/discussion/info',
		method: 'Get',
		data,
	})
}

// 评论
function discussioncomment(data) {
	return http({
		url: '/jeecg-boot/app/school/discussion/comment',
		method: 'Post',
		data,
	})
}


// 获取轮播图
function listByPosition(data) {
	return http({
		url: `/jeecg-boot/app/school/carousel/listByPosition`,
		method: 'Get',
		data,
	})
}

// 查看消息

function messageList(data) {
	return http({
		url: `/jeecg-boot/app/school/message/list`,
		method: 'Get',
		data,
	})
}

// 获取用户统计数据



function memberNumber() {
	return http({
		url: `/jeecg-boot/app/school/discussion/memberNumber`,
		method: 'Get',
	})
}


// 签到
function register(data) {
	return http({
		url: '/jeecg-boot/app/school/register/register',
		method: 'Post',
		data,
	})
}


// 修改用户信息

function memberUpdate(data) {
	return http({
		url: '/jeecg-boot/app/school/member/update',
		method: 'Post',
		data,
	})
}


// 关注
function follow(data) {
	return http({
		url: '/jeecg-boot/app/school/follow/follow',
		method: 'Post',
		data,
	})
}


// 我的帖子
function discussionMylList(data) {
	return http({
		url: `/jeecg-boot/app/school/discussion/MylList`,
		method: 'Get',
		data,
	})
}



// 发送验证码


function sendsms(phone) {
	return http({
		url: `/jeecg-boot/app/school/member/sms/${phone}/2`,
		method: 'Get',
	})
}

// 绑定手机号
function memberbing(data) {
	return http({
		url: '/jeecg-boot/app/school/member/bing',
		method: 'Post',
		data,
	})
}


// 查看是否签到

function getRegisterByNow() {
	return http({
		url: `/jeecg-boot/app/school/register/getRegisterByNow`,
		method: 'Get',
	})
}


// 查询粉丝列表

function followMyList(data) {
	return http({
		url: `/jeecg-boot/app/school/follow/followMyList`,
		method: 'Get',
		data,
	})
}


// 查询关注列表

function myFollowList() {
	return http({
		url: `/jeecg-boot/app/school/follow/myFollowList`,
		method: 'Get',
	})
}


// 发布跑腿

function release(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/release`,
		method: 'Post',
		data,
	})
}

// 分页查询 跑腿
function getHelpOrderList(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/list`,
		method: 'Get',
		data,
	})
}

// 获取订单详情
function helpOrderInfo(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/getInfo`,
		method: 'Get',
		data,
	})
}

// 发布人取消跑腿订单

function helpOrderCancelOrder(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/cancelOrder`,
		method: 'Post',
		data,
	})
}


// 支付
function helpOrderPay(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/pay`,
		method: 'Post',
		data,
	})
}

// 接单
function helpOrderReceive(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/receive`,
		method: 'Post',
		data,
	})
}


// 跑腿取消订单
function helpOrderCancelReceive(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/cancelReceive`,
		method: 'Post',
		data,
	})
}


// 跑腿确认订单
function helpOrderComplete(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/complete`,
		method: 'Post',
		data,
	})
}

// 发布人确认订单
function helpOrderConfirmComplete(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/confirmComplete`,
		method: 'Post',
		data,
	})
}

// 获取积分流水
function memberPoints(data) {
	return http({
		url: `/jeecg-boot/app/school/member/points`,
		method: 'Get',
		data,
	})
}


// 提现
function memberWithdraw(data) {
	return http({
		url: `/jeecg-boot/app/school/member/withdraw`,
		method: 'Post',
		data,
	})
}


// 提现
function memberGetTicket(data) {
	return http({
		url: `/jeecg-boot/app/school/member/getTicket`,
		method: 'Get',
		data,
	})
}

// 提现成功
function helpOrderConfirmWithdraw(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/confirmWithdraw?orderNo=` + data,
		method: 'Get',
	})
}


// 账号 && 提现记录
function memberBillDetails(data) {
	return http({
		url: `/jeecg-boot/app/school/member/billDetails`,
		method: 'Get',
		data,
	})
}

// 隐私政策
function privacyPolicyGetByType(data) {
	return http({
		url: `/jeecg-boot/app/school/privacyPolicy/getByType`,
		method: 'Get',
		data,
	})
}

// 新增收货地址

function receiptInformationAdd(data) {
	return http({
		url: `/jeecg-boot/app/school/receiptInformation/add`,
		method: 'Post',
		data,
	})
}

// 获取收货地址列表

function receiptInformationList() {
	return http({
		url: `/jeecg-boot/app/school/receiptInformation/list`,
		method: 'Get',
	})
}


function receiptInformationEdit(data) {
	return http({
		url: `/jeecg-boot/app/school/receiptInformation/edit`,
		method: 'Post',
		data,
	})
}


// 获取积分商城商品列表
function pointsGoodsList() {
	return http({
		url: `/jeecg-boot/app/school/pointsGoods/list`,
		method: 'Get',
	})
}

// 根据ID查询商品详情

function pointsGoodsQueryById(data) {
	return http({
		url: `/jeecg-boot/app/school/pointsGoods/queryById`,
		method: 'Get',
		data,
	})
}

// 积分兑换

function pointsOrderAdd(data) {
	return http({
		url: `/jeecg-boot/app/school/pointsOrder/add`,
		method: 'Post',
		data,
	})
}


// 查询兑换记录
function pointsOrderList(data) {
	return http({
		url: `/jeecg-boot/app/school/pointsOrder/list`,
		method: 'Get',
		data,
	})
}


// 删除已收货的订单
function pointsOrderDel(data) {
	return http({
		url: `/jeecg-boot/app/school/pointsOrder/delete/${data.id}`,
		method: 'Delete',
	})
}

// 签收订单
function pointsOrderSignfor(data) {
	return http({
		url: `/jeecg-boot/app/school/pointsOrder/signfor`,
		method: 'Post',
		data,
	})
}


// 根据 id 查询 积分兑换记录详情
function pointsOrderQueryById(data) {
	return http({
		url: `/jeecg-boot/app/school/pointsOrder/queryById`,
		method: 'Get',
		data,
	})
}


// 新增建议

function suggestionAdd(data) {
	return http({
		url: `/jeecg-boot/app/school/suggestion/add`,
		method: 'Post',
		data,
	})
}


// 福利好物团购查询商品列表

function groupGoodsList(data) {
	return http({
		url: `/jeecg-boot/app/school/groupGoods/list`,
		method: 'Get',
		data,
	})
}


// 福利好物团购根据id查详情
function groupGoodsQueryById(data) {
	return http({
		url: `/jeecg-boot/app/school/groupGoods/queryById`,
		method: 'Get',
		data,
	})
}


// 加入购物车
function cartAdd(data) {
	return http({
		url: `/jeecg-boot/app/school/cart/add`,
		method: 'Post',
		data,
	})
}
// 减少||删除购物车
function cartDelete(data) {
	return http({
		url: `/jeecg-boot/app/school/cart/delete`,
		method: 'Post',
		data,
	})
}


// 获取购物车

function schoolCartList(data) {
	return http({
		url: `/jeecg-boot/app/school/cart/list`,
		method: 'Get',
		data,
	})
}




// 生成订单

function groupOrder(data) {
	return http({
		url: `/jeecg-boot/app/school/groupOrder/order`,
		method: 'Post',
		data,
	})
}


// 获取支付信息

function groupOrderPay(data) {
	return http({
		url: `/jeecg-boot/app/school/groupOrder/pay`,
		method: 'Post',
		data,
	})
}

// 查询团购订单详情

function groupOrderDetail(data) {
	return http({
		url: `/jeecg-boot/app/school/groupOrder/queryByOrderNo`,
		method: 'Get',
		data,
	})
}

// 查询团购订单列表

function groupOrderList(data) {
	return http({
		url: `/jeecg-boot/app/school/groupOrder/list`,
		method: 'Get',
		data,
	})
}




// 删除已取消的订单
function groupOrderDeleteOrder(data) {
	return http({
		url: `/jeecg-boot/app/school/groupOrder/deleteOrder`,
		method: 'Post',
		data,
	})
}

// 团购确认订单
function groupOrderConfirm(data) {
	return http({
		url: `/jeecg-boot/app/school/groupOrder/confirm`,
		method: 'Post',
		data,
	})
}


// 查询默认地址
function getDefaultAddress(data) {
	return http({
		url: `/jeecg-boot/app/school/receiptInformation/defaultAddress`,
		method: 'Get',
		data,
	})
}


// 投诉
function complainAdd(data) {
	return http({
		url: `/jeecg-boot/app/school/complain/add`,
		method: 'Post',
		data,
	})
}

// 删除帖子
function deleteDiscussion(id) {
	return http({
		url: `/jeecg-boot/app/school/discussion/deleteDiscussion/${id}`,
		method: 'Post',
	})
}



// 取消订单 待支付或未发货的订单可取消
function cancelOrder(data) {
	return http({
		url: `/jeecg-boot/app/school/groupOrder/cancelOrder`,
		method: 'Post',
		data,
	})
}


// 跑腿支付成功手动回调
function paySuccess(data) {
	return http({
		url: `/jeecg-boot/app/school/helpOrder/paySuccess`,
		method: 'Post',
		data,
	})
}































export {
	getArea,
	schoolList,
	memberLogin,
	getMemberInfo,
	listByCategoryOneName,
	categoryTwoList,
	discussionList,
	discussionPublish,
	discussionLike,
	discussionInfo,
	discussioncomment,
	listByPosition,
	messageList,
	memberNumber,
	register,
	memberUpdate,
	follow,
	discussionMylList,
	sendsms,
	memberbing,
	getRegisterByNow,
	followMyList,
	myFollowList,
	release,
	getHelpOrderList,
	helpOrderInfo,
	helpOrderCancelOrder,
	helpOrderPay,
	helpOrderReceive,
	helpOrderCancelReceive,
	helpOrderComplete,
	helpOrderConfirmComplete,
	memberPoints,
	memberWithdraw,
	memberGetTicket,
	helpOrderConfirmWithdraw,
	memberBillDetails,
	privacyPolicyGetByType,
	receiptInformationAdd,
	receiptInformationList,
	receiptInformationEdit,
	pointsGoodsList,
	pointsGoodsQueryById,
	pointsOrderAdd,
	pointsOrderList,
	pointsOrderDel,
	pointsOrderSignfor,
	pointsOrderQueryById,
	suggestionAdd,
	groupGoodsList,
	groupGoodsQueryById,
	cartAdd,
	schoolCartList,
	cartDelete,
	groupOrder,
	groupOrderPay,
	groupOrderDetail,
	groupOrderList,
	groupOrderDeleteOrder,
	groupOrderConfirm,
	getDefaultAddress,
	complainAdd,
	deleteDiscussion,
	cancelOrder,
	paySuccess
}